<div style="border-width: 1px; border: 1px solid lightgray;margin: 0px 0px 15px;padding: 10px;" ng-controller="publishBillAuditDetlController">
	<div class="row" style="text-align: center;margin-bottom: 10px;">
		<h4>{{customer.customerName}} {{task.form.billType | code:'publishBillType'}}</h4>
	</div>
	<div class="row">
		<div class="col-md-4">
			<div class="form-group" style="margin-bottom: 0px;">
				<label class="col-md-3 control-label">
					广告内容:
				</label>
				<div class="col-md-8">
					<p class='form-control-static'>{{task.form.content}}   </p> 
				</div>
			</div>
		</div>
		<div class="col-md-5">
			<div class="form-group" style="margin-bottom: 0px;">
				<label class="col-md-4 control-label">
					上刊周期:
				</label>
				<div class="col-md-8">
						<p class='form-control-static'>{{task.form.publishTime | limitTo:10}} - {{task.form.publishOffTime | limitTo:10}}</p> 
				</div>
			</div>
		</div>
		<div class="col-md-3">
			<div class="form-group" style="margin-bottom: 0px;">
				<div class="col-md-5">
					<p class='form-control-static'><a  ng-show="publishFile" ng-href="{{nginxPath + publishFile.path}}" target="_blank">资料下载</a></p>
				</div>
			</div>				
		</div>
		<div class="row" ng-show="adModelImgs">
					<div class="col-md-12">
						<div class="form-group" style="margin-bottom: 0px;">
							<label class="col-md-1 control-label">
								样&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;刊:
							</label>
							<div class="col-md-9">
								<div style="display: inline-block;width: 100px;margin-left: 10px;position: relative;" ng-repeat="img in adModelImgs">
                        			<img ng-src="{{nginxPath + img.path}}" style="width: 100px;height: 100px;border: lightgray 1px solid;">
                        		</div>
							</div>
						</div>
					</div>
		</div>
	</div>
	<div class="row">
		<div ng-show="task.form.billType == '1'" class="portlet-body"
			style="width: 100%;">
			<table
				class="table table-striped table-bordered table-hover dataTable"
				style="border-top: 0px;">
				<thead>
					<tr>
						<th style="text-align: center">
							资源编号
						</th>
						<th style="text-align: center">
							媒体形式
						</th>
						<th style="text-align: center">
							车型
						</th>
						<th style="text-align: center">
							车牌号
						</th>
						<th style="text-align: center">
							自编号
						</th>
						<th style="text-align: center">
							线路
						</th>
						<th style="text-align: center">
							营运公司
						</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="resource in billDetails">
						<td style="text-align: center; ">
							{{resource.resourceCode}}
						</td>
						<td style="text-align: center;">
							{{resource.mediaName}}
						</td>
						<td style="text-align: center;">
							{{resource.busFloor | code:'BUS_FLOOR'}}
						</td>
						<td style="text-align: center;">
							{{resource.plateNo}}
						</td>
						<td style="text-align: center;">
							{{resource.vehicleNo}}
						</td>
						<td style="text-align: center;">
							{{resource.lineNo}}
						</td>
						<td style="text-align: center;">
							{{resource.companyName}}
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<div ng-show="task.form.billType == '2'" class="portlet-body"
			style="width: 100%;">
			<table
				class="table table-striped table-bordered table-hover dataTable"
				style="border-top: 0px;">
				<thead>
					<tr>
						<th style="text-align: center">
							资源编号
						</th>
						<th style="text-align: center">
							媒体形式
						</th>
						<th style="text-align: center">
							站点名称
						</th>
						<th style="text-align: center">
							所在街道
						</th>
						<th style="text-align: center">
							行向
						</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="resource in billDetails">
						<td style="text-align: center;">
							{{resource.resourceCode}}
						</td>
						<td style="text-align: center;">
							{{resource.mediaName}}
						</td>
						<td style="text-align: center;">
							{{resource.stopName}}
						</td>
						<td style="text-align: center;">
							{{resource.roadName}}
						</td>
						<td style="text-align: center;">
							{{resource.direction}}
						</td>

					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
<div style="border-width: 1px; border: 1px solid lightgray;margin: 0px 0px 15px;padding: 10px;">
	<div class="row">
		<div class="col-md-12">
			<div class="form-group">
				<label class="col-md-2 control-label">
					<span class="required">*</span>审批意见
				</label>
				<div class="col-md-8">
					<select class="form-control" ng-model="task.form.auditComment"
						name="auditComment" required>
						<option value="同意">
							同意
						</option>
						<option value="不同意">
							不同意
						</option>
					</select>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<div class="form-group">
				<label class="col-md-2 control-label">
					审批说明
				</label>
				<div class="col-md-8">
					<textarea class="form-control" name="auditRemark"
						ng-model="task.form.auditRemark"></textarea>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
	function publishBillAuditDetlController($rootScope, $scope, $state, Page){
		 Page.ajaxPostQuiet('publishBill/queryBillDetails.do', {billId : $scope.task.form.billId}, function (resp) {
		      $scope.billDetails = resp.data.array;
	          	var bidFiles = resp.data.fileArray;
				var bidImgs = resp.data.imgArray;
				$scope.publishFile = bidFiles.length > 0 ? bidFiles[0]:null;
				$scope.adModelImgs = bidImgs;
	          $scope.billImgs = resp.data.imgArray;
		 });
		 Page.ajaxPostQuiet('customer/' +  $scope.task.form.customerId + '/info.do', null, function (resp) {
		      $scope.customer = resp.data;
		 });
	 }
</script>
